package controllers;

import java.util.List;

import models.MBao;

import play.mvc.Controller;

public class Bao extends Controller {
	
	
	public static void index(){
		List<MBao> baos = MBao.find("order by score desc").fetch(10);
		render(baos);
	}
	
	public static void show(long id){
		MBao bao = MBao.findById(id);
		redirect(bao.link);
	}
}
